package com.kuangstudy.base;

/**
 * ClassName: com.kuangstudy.base.demo3
 * date: 2021/7/9/009
 *
 * @author zlk
 */
public class demo3 {
    public static void main(String[] args) {
        /**
         * jdk7 新特性，数字之间可以用下划线分割
         * int 最大值2147483647
         */
        int money = 10_0000_0000;
        int year = 20;
        System.out.println(money);//1000000000
        System.out.println(money*year);//-1474836480 计算溢出了
        long total = money*year;//默认是int，转换前已经出问题了
        long total2 =money*(long)year;
        System.out.println(total2);//20000000000
    }
}
